package reit.ass3;

import java.util.ArrayList;
import java.util.LinkedList;

import org.apache.log4j.Logger;


/**
 * The Class CustomerGroupDetails.
 */
class CustomerGroupDetails {

	/** The  group manager name. */
	private final String mGroupManagerName;

	/** The  customers. */
	private ArrayList<Customer> mCustomers;

	/** The  rental requests. */
	private LinkedList<RentalRequest> mRentalRequests;

	/** The logger. */
	private Logger fLogger;

	/**
	 * Instantiates a new customer group details.
	 *
	 * @param groupManagerName the group manager name
	 * @param customerContainer the customer container
	 * @param rentalRequestContainer the rental request container
	 */
	public CustomerGroupDetails(final String groupManagerName,
			final ArrayList<Customer> customerContainer,
			final LinkedList<RentalRequest> rentalRequestContainer) {
		fLogger = Logger.getLogger(CustomerGroupDetails.class);
		fLogger.info(MyStringBuilder.buildString(
				"Creating CustomerGroupDetails for manager:", groupManagerName));
		this.mGroupManagerName = groupManagerName;
		this.mCustomers = customerContainer;
		this.mRentalRequests = rentalRequestContainer;
	}

	/**
	 * Adds the customer.
	 *
	 * @param customers the customers
	 */
	public void addCustomer(final ArrayList<Customer> customers) {
		this.mCustomers.addAll(customers);
	}

	/**
	 * Adds the rental request.
	 *
	 * @param tRentalRequests the rental requests
	 */
	public void addRentalRequest(final LinkedList<RentalRequest> tRentalRequests) {
		this.mRentalRequests.addAll(tRentalRequests);
	}

	/**
	 * Gets the group manager name.
	 *
	 * @return the group manager name
	 */
	public String getGroupManagerName() {
		return mGroupManagerName;
	}

	/**
	 * Gets the customers.
	 *
	 * @return the customers
	 */
	public ArrayList<Customer> getCustomers() {
		return mCustomers;
	}

	/**
	 * Gets the rental requests.
	 *
	 * @return the rental requests
	 */
	public LinkedList<RentalRequest> getRentalRequests() {
		return mRentalRequests;
	}

}
